import { createApp } from 'vue'
import router from './router'
import App from './App.vue'

import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/antd.css';

import markdownItMermaid from '@liradb2000/markdown-it-mermaid'

// Import V-MD-Editor
import VMdEditor from '@kangc/v-md-editor'
import '@kangc/v-md-editor/lib/style/base-editor.css';
import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js';
import '@kangc/v-md-editor/lib/theme/style/vuepress.css';

import Prism from 'prismjs';

// Import Previewer
import VMdPreview from '@kangc/v-md-editor/lib/preview'
import '@kangc/v-md-editor/lib/style/preview.css'

VMdEditor.use(vuepressTheme, {
    Prism,
    extend(md) {
        md.use(markdownItMermaid)
    }
})

VMdPreview.use(vuepressTheme, {
    Prism,
    extend(md) {
        md.use(markdownItMermaid)
    }
})

const app = createApp(App);
app.use(router);
app.use(Antd);
app.use(VMdEditor)
app.use(VMdPreview)
app.mount("#app");